package enum_.bean;

/**
 * JDK 1.5 之前 通过特殊方式实现
 */
public class Gender {
    private static final Gender MALE = new Gender("男");
    private static final Gender FEMALE = new Gender("女");
    private String value;

    public String getValue() {
        return value;
    }

    private Gender(String value) {
        this.value = value;
    }

    public static Gender getMale() {
        return MALE;
    }

    public static Gender getFemale() {
        return FEMALE;
    }
}
